﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using Budget.DataAccess;

namespace Budget.WCF
{
	// NOTE: If you change the interface name "IIncomeService" here, you must also update the reference to "IIncomeService" in App.config.
	[ServiceContract]
	public interface IIncomeService
	{
		/// <summary>
		/// Gets all Income objects
		/// </summary>
		[OperationContract]
		IList<Income> GetAll();

		/// <summary>
		/// Gets a single Income object by it's ID
		/// </summary>
		[OperationContract]
		Income GetIncomeById(int ID);

		/// <summary>
		/// Saves a single Income object, either inserting or updating the records values
		/// </summary>
		/// <param name="income"></param>
		[OperationContract]
		void Save( Income income );

		/// <summary>
		/// Gets the total Income for all the active Income records
		/// </summary>
		/// <param name="income"></param>
		[OperationContract]
		decimal GetTotalIncome();
	}
}
